package com.ffmpeg.util.infra.config;

import com.ffmpeg.util.infra.constant.DealWhenExistEnum;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author :wm
 * @description : 文件配置类
 */
@Configuration
@ConfigurationProperties(prefix = "ffmpeg.file")
public class FileConfigProperties {
    /**
     * 导出的目录
     */
    private String exportDirPath = ".\\";
    /**
     * 上传文件进行操作时的临时文件夹
     */
    private String tmpDirPath = ".\\";
    /**
     * ffmpeg命令，如未配环境变量则是ffmpeg的绝对路径
     */
    private String prefixFfmpegPath = "ffmpeg";
    /**
     * 当文件存在时的处理方式
     */
    private DealWhenExistEnum dealWhenExistEnum = DealWhenExistEnum.DELETE;

    private String mergeTxtPath = "\\merge.txt";

    private String mergeVideoName = "merge";

    public String getExportDirPath() {
        return exportDirPath;
    }

    public FileConfigProperties setExportDirPath(String exportDirPath) {
        this.exportDirPath = exportDirPath;
        return this;
    }

    public String getTmpDirPath() {
        return tmpDirPath;
    }

    public FileConfigProperties setTmpDirPath(String tmpDirPath) {
        this.tmpDirPath = tmpDirPath;
        return this;
    }

    public String getPrefixFfmpegPath() {
        return prefixFfmpegPath;
    }

    public FileConfigProperties setPrefixFfmpegPath(String prefixFfmpegPath) {
        this.prefixFfmpegPath = prefixFfmpegPath;
        return this;
    }

    public DealWhenExistEnum getDealWhenExistEnum() {
        return dealWhenExistEnum;
    }

    public FileConfigProperties setDealWhenExistEnum(DealWhenExistEnum dealWhenExistEnum) {
        this.dealWhenExistEnum = dealWhenExistEnum;
        return this;
    }

    public String getMergeTxtPath() {
        return mergeTxtPath;
    }

    public FileConfigProperties setMergeTxtPath(String mergeTxtPath) {
        this.mergeTxtPath = mergeTxtPath;
        return this;
    }

    public String getMergeVideoName() {
        return mergeVideoName;
    }

    public FileConfigProperties setMergeVideoName(String mergeVideoName) {
        this.mergeVideoName = mergeVideoName;
        return this;
    }
}
